//
//  ASTextMainCell.m
//  AvatarShow
//
//  Created by xunruiIOS on 2021/4/29.
//

#import "ASTextMainCell.h"

@implementation ASTextMainCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self.contentView addSubview:self.mainView];
        [self.mainView addSubview:self.mainLab];
        
        [self.mainView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_equalTo(UIEdgeInsetsMake(0, 25, 10, 25));
        }];
        
        [self.mainLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_equalTo(UIEdgeInsetsMake(10, 18, 10, 18));

        }];
    }
    return self;
}

- (UIView *)mainView{
    if (!_mainView) {
        _mainView = [UIView new];
        _mainView.layer.masksToBounds = YES;
        _mainView.layer.cornerRadius = 6;
    }
    return _mainView;
}

- (UILabel *)mainLab{
    if (!_mainLab) {
        _mainLab = [UILabel new];
        _mainLab.font = [UIFont systemFontOfSize:15];
        _mainLab.textColor = [UIColor colorWithHexString:@"1a1a1a"];
        _mainLab.numberOfLines = 0;
        _mainLab.textAlignment = NSTextAlignmentCenter;
    }
    return _mainLab;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
